<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  function Fn(a){
    this.a = a;
  }
  Fn.prototype.init = function(){
    console.log(this.msg);
  }

  
  function Parent(m){
    this.msg = m;
  }
  Parent.prototype.show = function(){
    console.log(this.msg, this.a)
  }

  function Child(m, x){
    Parent.call(this, m)
    Fn.call(this, x)
  }
  Child.prototype = {
    ...Parent.prototype,
    ...Fn.prototype
    // show(){
    //   console.log("zilei的show")
    // }
  }
  // Child.prototype = Object.create(Parent.prototype);
  // Child.prototype = deepCopy(Parent.prototype);

  const p = new Parent("hello");
  console.log(p);
  p.show();

  const c = new Child("world", 123);
  console.log(c);
  c.show();
  c.init();
  
</script>
</html>